import request from "@/request/api";

//品牌库接口
//1.缺陷库查询接口
export function queryDefectList(data) {
  return request({
    url: "/eam-service-standard/defectStock/page",
    method: "get",
    params: data,
  });
}
//2、缺陷库新增或修改接口
export function saveDefect(data) {
  return request({
    url: "/eam-service-standard/defectStock",
    method: "post",
    data: data,
  });
}
//3、缺陷库删除接口
export function deleteDefect(data) {
  return request({
    url: "/eam-service-standard/defectStock",
    method: "delete",
    params: data,
  });
}
//缺陷库引用权重+1
export function DefectRefPlus(data) {
  return request({
    url: "/eam-service-standard/defectStock/ref",
    method: "get",
    params: data,
  });
}
//查询缺陷类型
export function queryDefectType(data) {
  return request({
    url: "/eam-service-standard/defectStock/listByParent",
    method: "get",
    params: data,
  });
}

//合并缺陷库
export function mergeDefect(data) {
  return request({
    url: "/eam-service-standard/defectStock/merge",
    method: "put",
    data: data,
  });
}

//缺陷库导入接口
export function importdefectStock(formData) {
  return request({
    url: "/eam-service-standard/defectStock/import",
    method: "post",
    data: formData,
  });
}
